﻿const path = require('path');

var CONFIG ={};
CONFIG.DEBUG=1;// 0 Release,1 本地， 2 测试服务器
CONFIG.HOME_PPT = 0; // home工程：1表示为ppt官网主页域名，0表示www官网主页域名

//------------------------------------------------------------------
// 部分常量定义
CONFIG.CONST={};
CONFIG.CONST.WEB_HOME_SERVER_DOMAIN = 'www.itbour.com'; // www官网主页域名
CONFIG.CONST.WEB_PPT_SERVER_DOMAIN = 'ppt.itbour.com'; // ppt官网主页域名
CONFIG.CONST.INNER_TEST_SERVER_DOMAIN = 'www.itbour.com'; // 内网服务器域名
CONFIG.CONST.INNER_TEST_SERVER_IP = 'test.itbour.com'; // 内网服务器IP
if(CONFIG.DEBUG===1) CONFIG.CONST.INNER_TEST_SERVER_DOMAIN = '127.0.0.1'; // 内网服务器>
if(CONFIG.DEBUG===2) CONFIG.CONST.INNER_TEST_SERVER_DOMAIN = 'test.itbour.com'; // 内网服务器>
//------------------------------------------------------------------

//CONFIG.BASE_IP = 'http://127.0.0.1:3000';
//CONFIG.BASE_IP = 'http://192.168.1.105:3000';
CONFIG.BASE_IP = 'http://127.0.0.1:3001';
//------------------------------------------------------------------
if(CONFIG.DEBUG==1) CONFIG.DB_HOST_MYSQL= 'thisistestdb.mysql.rds.aliyuncs.com';//thisistestdb.mysql.rds.aliyuncs.com'47.97.22.47';//'rds232epgj64a270k419o.mysql.rds.aliyuncs.com';//'127.0.0.1';        // 开发本地调试
else if(CONFIG.DEBUG==2)  CONFIG.DB_HOST_MYSQL= 'rm-bp1im9v37vde0m51xi.mysql.rds.aliyuncs.com';  // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_DATABASE_MYSQL= 'itbour';//'itbour';    // 开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_DATABASE_MYSQL= 'itbour';    // 外网部署
if(CONFIG.DEBUG==1)  CONFIG.DB_PORT_MYSQL= 3306;            // 开发本地调试
else if(CONFIG.DEBUG==2)  CONFIG.DB_PORT_MYSQL= 3306;                 // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_USER_MYSQL= 'sjg'; // 'root';              // 开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_USER_MYSQL= 'sjg';           // 外网部署
if(CONFIG.DEBUG==1)  CONFIG.DB_PASSWORD_MYSQL= 'lycisswt818ttwdpZ';// '123456';    // 'lycisswt818ttwdpZ';//开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_PASSWORD_MYSQL= 'lycisswt818ttwdpZ';//'sjg123';    // 外网部署


if(CONFIG.DEBUG==1) CONFIG.DB_HOST_MYSQL_YJX= 'thisistestdb.mysql.rds.aliyuncs.com';//'47.97.22.47';//'rds232epgj64a270k419o.mysql.rds.aliyuncs.com';//'127.0.0.1';        // 开发本地调试
else if(CONFIG.DEBUG==2)  CONFIG.DB_HOST_MYSQL_YJX= 'rm-bp1im9v37vde0m51xi.mysql.rds.aliyuncs.com';  // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_DATABASE_MYSQL_YJX= 'yjx';//'itbour';    // 开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_DATABASE_MYSQL_YJX= 'yjx';    // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_PORT_MYSQL_YJX= 3306;            // 开发本地调试
else if(CONFIG.DEBUG==2)  CONFIG.DB_PORT_MYSQL_YJX= 3306;                 // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_USER_MYSQL_YJX= 'sjg'; // 'root';              // 开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_USER_MYSQL_YJX= 'sjg';           // 外网部署
if(CONFIG.DEBUG==1) CONFIG.DB_PASSWORD_MYSQL_YJX= 'lycisswt818ttwdpZ';//'123456';    // 'lycisswt818ttwdpZ';//开发本地调试
else if(CONFIG.DEBUG==2)   CONFIG.DB_PASSWORD_MYSQL_YJX= 'lycisswt818ttwdpZ';//'sjg123';    // 外网部署



// home/home_ppt 服务的配置(ppt官网和www官网共用同一个home工程)
if(CONFIG.DEBUG==1) CONFIG.HOME_SERVER_DOMAIN_FOR_HOME      = CONFIG.CONST.INNER_TEST_SERVER_DOMAIN ;// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.HOME_SERVER_DOMAIN_FOR_HOME = CONFIG.CONST.INNER_TEST_SERVER_DOMAIN;// 测试服务器


if(CONFIG.DEBUG==1) CONFIG.HOME_SERVER_DOMAIN_FOR_PPT       = CONFIG.CONST.INNER_TEST_SERVER_DOMAIN ;// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.HOME_SERVER_DOMAIN_FOR_PPT  = CONFIG.CONST.INNER_TEST_SERVER_DOMAIN;// 测试服务器

if(CONFIG.HOME_PPT==1) CONFIG.HOME_SERVER_DOMAIN    = CONFIG.HOME_SERVER_DOMAIN_FOR_PPT
else  CONFIG.HOME_SERVER_DOMAIN                     = CONFIG.HOME_SERVER_DOMAIN_FOR_HOME
CONFIG.HOME_SERVER_PORT = 2700;
if (CONFIG.DEBUG === 1) CONFIG.HOME_SERVER_FULL_URL =  'http://'+ CONFIG.HOME_SERVER_DOMAIN+':'+CONFIG.HOME_SERVER_PORT;
if (CONFIG.DEBUG === 2) CONFIG.HOME_SERVER_FULL_URL =  'https://'+ CONFIG.HOME_SERVER_DOMAIN;

if (CONFIG.DEBUG === 1) CONFIG.HOME_SERVER_FULL_URL_FOR_APP = 'http://'+ CONFIG.HOME_SERVER_DOMAIN+':'+CONFIG.HOME_SERVER_PORT;
if (CONFIG.DEBUG === 2) CONFIG.HOME_SERVER_FULL_URL_FOR_APP = 'https://'+ CONFIG.HOME_SERVER_DOMAIN;


// fast 服务的配置
if(CONFIG.DEBUG) CONFIG.FAST_SERVER_DOMAIN = 'www.test.com';//'127.0.0.1';// 开发本地调试
CONFIG.FAST_SERVER_PORT = 2701;
CONFIG.FAST_SERVER_FULL_URL =  CONFIG.DEBUG?('http://'+ CONFIG.FAST_SERVER_DOMAIN+':'+CONFIG.FAST_SERVER_PORT):('http://'+ CONFIG.FAST_SERVER_DOMAIN);

// api服务的设置
//CONFIG.API_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
//CONFIG.API_SERVER_DOMAIN = '192.168.31.227';       // 开发本地调试
//CONFIG.API_SERVER_DOMAIN = '10.47.96.10';       // 外网调试
CONFIG.API_SERVER_DOMAIN = 'www.itbour.com';// 外网部署
if(CONFIG.DEBUG==1) CONFIG.API_SERVER_IP = '127.0.0.1';//'127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.API_SERVER_IP = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.API_SERVER_IP_LOCAL = '127.0.0.1';      // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.API_SERVER_IP_LOCAL = '47.97.22.47';// 测试服务器

CONFIG.API_SERVER_PORT = 3000;
CONFIG.API_SERVER_RPC_PORT = 4000;

CONFIG.API_SERVER_FULL_URL = 'http://'+CONFIG.API_SERVER_IP+':'+CONFIG.API_SERVER_PORT;


// MongoDB设置
if(CONFIG.DEBUG==1) {
    CONFIG.MGDB_DOMAIN = '127.0.0.1';//'120.27.141.121';
    CONFIG.MGDB_PORT = 27017; //3717;
}else if(CONFIG.DEBUG==2) {
    CONFIG.MGDB_DOMAIN = '127.0.0.1';//'120.27.141.121';
    CONFIG.MGDB_PORT = 27017; //3717;
}

CONFIG.MGDB_USER = 'mdbu';
CONFIG.MGDB_PASSWORD = 'md983FueoxYezo008';
CONFIG.MGDB_DBNAME = 'itbour';



// weixin 服务器的设置
if(CONFIG.DEBUG==1) CONFIG.WX_SERVER_DOMAIN = '127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.WX_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.WX_SERVER_PORT = 2000;
CONFIG.WX_SERVER_RPC_PORT = 2100;

// check 服务的配置
if(CONFIG.DEBUG==1) CONFIG.CHECK_SERVER_DOMAIN = '127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.CHECK_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.CHECK_SERVER_PORT = 2800;

// publish 服务的配置
if(CONFIG.DEBUG==1) CONFIG.PUBLISH_SERVER_DOMAIN = '127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.PUBLISH_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.PUBLISH_SERVER_PORT = 2801;

// switch 服务的配置
if(CONFIG.DEBUG==1) CONFIG.SWITCH_SERVER_DOMAIN = '127.0.0.1';//'127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.SWITCH_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.SWITCH_SERVER_PORT = 2900;

// upload 服务的配置
if(CONFIG.DEBUG==1) CONFIG.UPLOAD_SERVER_DOMAIN = 'www.test.com';//'127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.UPLOAD_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.UPLOAD_SERVER_PORT = 2905;
CONFIG.UPLOAD_SERVER_FULL_URL = CONFIG.DEBUG?('http://'+ CONFIG.UPLOAD_SERVER_DOMAIN+':'+CONFIG.UPLOAD_SERVER_PORT):('http://'+ CONFIG.UPLOAD_SERVER_DOMAIN)

// kingsoft服务的配置
if(CONFIG.DEBUG==1) CONFIG.KINGSOFT_SERVER_DOMAIN = 'www.test.com';//'127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.KINGSOFT_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.KINGSOFT_SERVER_PORT = 2910;

//Design out服务的配置
if(CONFIG.DEBUG==1) CONFIG.DESIGN_SERVER_DOMAIN = '127.0.0.1';//'127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.DESIGN_SERVER_DOMAIN = 'test-design.itbour.com';// 测试服务器
CONFIG.DESIGN_SERVER_PORT = 2702;
if(CONFIG.DEBUG === 1) CONFIG.DESIGN_SERVER_FULL_URL = 'http://' + CONFIG.DESIGN_SERVER_DOMAIN + ':' + CONFIG.DESIGN_SERVER_PORT;
if(CONFIG.DEBUG === 2) CONFIG.DESIGN_SERVER_FULL_URL = 'https://' + CONFIG.DESIGN_SERVER_DOMAIN;

// encrypt服务的配置
if(CONFIG.DEBUG==1) CONFIG.ENCRYPT_SERVER_DOMAIN = '127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.ENCRYPT_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.ENCRYPT_SERVER_PORT = 2918;

// sms服务的配置
if(CONFIG.DEBUG==1) CONFIG.SMS_SERVER_DOMAIN = '114.55.132.81';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.SMS_SERVER_DOMAIN = '114.55.132.81';// 测试服务器

CONFIG.SMS_SERVER_PORT = 2901;



// 自动排版服务的设置
if(CONFIG.DEBUG==1) CONFIG.AUTO_SERVER_DOMAIN = '47.97.22.47';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.AUTO_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.AUTO_SERVER_PORT = 3001;
CONFIG.AUTO_SERVER_RPC_PORT = 4001;

// 文字服务器的设置
if(CONFIG.DEBUG==1) CONFIG.FONT_SERVER_DOMAIN = '114.55.174.98';       // “直接对内文字服务”的测试地址
else if(CONFIG.DEBUG==2) CONFIG.FONT_SERVER_DOMAIN = '114.55.174.98';// 测试服务器

CONFIG.FONT_SERVER_PORT = 3002;         // “直接对内文字服务”的测试端口＋外网部署端口
CONFIG.FONT_SERVER_RPC_PORT = 4002;     // “直接对内文字服务”的测试RPC端口＋外网部署RPC端口
if(CONFIG.DEBUG==1) CONFIG.FONT_SERVER_DOMAIN_OUTSIDE = '114.55.174.98';       // “直接对外文字服务”的测试地址
else if(CONFIG.DEBUG==2) CONFIG.FONT_SERVER_DOMAIN_OUTSIDE = '114.55.174.98';// 测试服务器

CONFIG.FONT_SERVER_DOMAIN_OUTSIDE_FULL_URL = CONFIG.DEBUG?('http://'+ CONFIG.FONT_SERVER_DOMAIN_OUTSIDE+':'+CONFIG.FONT_SERVER_PORT):('http://'+ CONFIG.FONT_SERVER_DOMAIN_OUTSIDE);
if(CONFIG.DEBUG==1) CONFIG.FONT_FILE_PATH = '/Users/itbour/Desktop/fonts/';       // 本地字体文件的地址
else if(CONFIG.DEBUG==2) CONFIG.FONT_FILE_PATH = '/mnt/';// 测试服务器字体文件的地址


// 图片服务器的设置
if(CONFIG.DEBUG==1) CONFIG.IMAGE_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.IMAGE_SERVER_DOMAIN = '47.96.41.204';// 测试服务器

CONFIG.IMAGE_SERVER_PORT = 3003;
CONFIG.IMAGE_SERVER_RPC_PORT = 4003;

// 视频解析服务器的设置
if(CONFIG.DEBUG==1) CONFIG.VIDEO_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.VIDEO_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.VIDEO_SERVER_PORT = 3004;
CONFIG.VIDEO_SERVER_RPC_PORT = 4004;

// ppt服务的设置
if(CONFIG.DEBUG==1) CONFIG.PPT_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.PPT_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.PPT_SERVER_PORT = 3005;
CONFIG.PPT_SERVER_RPC_PORT = 4005;

// 在线支付服务器设置
if(CONFIG.DEBUG==1) CONFIG.PAYMENT_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.PAYMENT_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.PAYMENT_SERVER_PORT = 3006;
CONFIG.PAYMENT_SERVER_RPC_PORT = 4006;

// 定时任务服务器设置
if(CONFIG.DEBUG==1) CONFIG.TIMER_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.TIMER_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.TIMER_SERVER_PORT = 3007;
CONFIG.TIMER_SERVER_RPC_PORT = 4007;

// 统计服务器设置
CONFIG.STATISTIC_SERVER_PORT = 3008;
CONFIG.STATISTIC_SERVER_RPC_PORT = 4008;

// 视频服务器设置
if(CONFIG.DEBUG==1) CONFIG.SVIDEO_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.SVIDEO_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.SVIDEO_SERVER_PORT = 3009;
CONFIG.SVIDEO_SERVER_RPC_PORT = 4009;

// 视频渲染服务器设置
if(CONFIG.DEBUG==1) CONFIG.SVRENDER_SERVER_DOMAIN = '127.0.0.1';
else if(CONFIG.DEBUG==2) CONFIG.SVRENDER_SERVER_DOMAIN = '100.98.27.101';
CONFIG.SVRENDER_SERVER_PORT = 3010;
CONFIG.SVRENDER_SERVER_RPC_PORT = 4010;
/* @deprecated */
CONFIG.SPLIT_SHORT_VIDEO_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/createShortVideoOfRange"; //[废弃]
/* @deprecated */
CONFIG.SPLIT_SHORT_VIDEO_URL2 = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/createShortVideoOfRange2"; //[废弃]
CONFIG.SPLIT_SHORT_VIDEO_URL3 = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/createShortVideoOfRange3";
/* @deprecated */
CONFIG.COMBINE_MULTI_SHORT_VIDEO_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/combineMultilShortVideo"; //[废弃]
CONFIG.COMBINE_MULTI_SHORT_VIDEO_URL2 = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/combineMultilShortVideo2";
CONFIG.INIT_SHORT_VIDEO_DATA_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/initShortVideoData";
CONFIG.COMPOSITE_VIDEO_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/compositeVideo";
CONFIG.GET_KEYFRAMES_OF_VIDEO_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/getKeyframesOfVideo";

// 自由创建初始化和生成片段
CONFIG.INIT_USER_CUSTOM_VIDEO_DATA = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/initUserCustomVideoData";
CONFIG.USER_CUSTOM_RANGE_RENDER2 = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/userCustomRangeRender2";
// 文字转视频
CONFIG.INIT_TEXT_TO_VIDEO_DATA = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/initText2VideoData";
CONFIG.RANGE_TEXT_TO_VIDEO = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/rangeText2Video";
// 初始化语音识别
CONFIG.INIT_AUDIO_TO_TEXT = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/initAudioToText";

CONFIG.INIT_SHORT_VIDEO_DATA_URL_FOR_AEJSON = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/initShortVideoDataForAEJson";
CONFIG.COMBINE_MULTI_SHORT_VIDEO_URL_FOR_AEJSON = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/combineMultilShortVideoForAEJson";
CONFIG.SPLIT_SHORT_VIDEO_URL_FOR_AEJSON = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/createShortVideoOfRangeForAEJson";
CONFIG.PARSE_INFO_FROM_AEJSON_URL = "http://"+CONFIG.SVRENDER_SERVER_DOMAIN+":"+CONFIG.SVRENDER_SERVER_PORT+"/range/parseInfoFromAEJson";

CONFIG.ADJUST_DESIGN_FINETUNE_AND_TG = "http://"+CONFIG.IMAGE_SERVER_DOMAIN+":"+CONFIG.IMAGE_SERVER_PORT+"/tg/adjustDesignFinetuneAndTg";

// 视频渲染程序的地址
if(CONFIG.DEBUG==1) CONFIG.SVRENDER3_FILE_PATH = "/Users/jackliu/Library/Developer/Xcode/DerivedData/svrender3-ezwhyoefwepbcgcbxmzsonmkidof/Build/Products/Default/svrender3";
else if(CONFIG.DEBUG==2) CONFIG.SVRENDER3_FILE_PATH = "/root/upload/nodejs-addon/module/pg/svrender3/out/Default/svrender3";
// svrender3的接口名称
CONFIG.SVRENDER3_NORMAL_RENDER= "sv_normal_render";
CONFIG.SVRENDER3_SPLIT_RENDER= "sv_split_render";
CONFIG.SVRENDER3_RANGE_RENDER= "sv_range_render";

CONFIG.SVRENDER3_INIT_SHORT_VIDEO_DATA= "sv_init_short_video_data";
CONFIG.SVRENDER3_RANGE_RENDER2= "sv_range_render2";
CONFIG.SVRENDER3_COMBINE_MULTI_SHORT_VIDEO= "sv_combine_multi_short_video";
CONFIG.SVRENDER3_COMPOSITE_VIDEO ="sv_composite_video";
CONFIG.SVRENDER3_GET_KEYFRAMES_OF_VIDEO ="sv_get_keyframes_of_video";
// 自由创建
CONFIG.SVRENDER3_INIT_USER_CUSTOM_VIDEO_DATA = "sv_init_user_custom_video_data";
CONFIG.SVRENDER3_USER_CUSTOM_RANGE_RENDER2 = "sv_user_custom_range_render2";
// 文字转视频
CONFIG.SVRENDER3_INIT_TEXT_TO_VIDEO_DATA = "sv_init_text_2_video";
CONFIG.SVRENDER3_RANGE_TEXT_TO_VIDEO = "sv_text_2_video_render";
// 启动语音转文字
CONFIG.SVRENDER3_SV_AUDIO_TO_TEXT = "sv_audio_2_text";

CONFIG.SVRENDER3_INIT_SHORT_VIDEO_DATA_FOR_AEJSON ="sv_init_short_video_data_for_aejson";
CONFIG.SVRENDER3_RANGE_RENDER2_FOR_AEJSON ="sv_range_render2_for_aejson";
CONFIG.SVRENDER3_COMBINE_MULTI_SHORT_VIDEO_FOR_AEJSON ="sv_combine_multi_short_video_for_aejson";
CONFIG.SVRENDER3_PARSE_INFO_FROM_AEJSON ="sv_parse_info_from_aejson";



CONFIG.SVRENDER3_CREATE_IMAGE_OF_PAGE ="sv_create_image_of_page";
CONFIG.SVRENDER3_SV_COMPOUNDPATH_JSON_TO_IMG ="sv_compoundpath_json_to_img"
CONFIG.SVRENDER3_COMBINE_IMG ="sv_combine_img"
CONFIG.SVRENDER3_MONTAGE_IMGS ="sv_montage_imgs"
CONFIG.SVRENDER3_TYPESET_TG_DOC ="sv_typeset_tg_doc"
CONFIG.SVRENDER3_ADJUST_DESIGN_FINETUNE_AND_TG = "sv_adjust_design_finetune_and_tg" // 创建模版微调数据并更新提纲数据


CONFIG.SVRENDER3_SV_CHECK_TG_DOC = 'sv_check_tg_doc';

CONFIG.RET_STR_OF_SVRENDER3_0 ="retOfSvrender3:[[";
CONFIG.RET_STR_OF_SVRENDER3_1 ="]]";


// app 嵌入网页服务器设置
if(CONFIG.DEBUG==1) CONFIG.APP_HOME_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.APP_HOME_SERVER_DOMAIN = 'test.itbour.com';// 测试服务器

CONFIG.APP_HOME_SERVER_PORT = 3011;
CONFIG.APP_HOME_SERVER_RPC_PORT = 4011;
CONFIG.APP_HOME_SERVER_FULL_URL = 'https://' + CONFIG.APP_HOME_SERVER_DOMAIN + CONFIG.APP_HOME_SERVER_PORT;
if (CONFIG.DEBUG) {
    CONFIG.APP_HOME_SERVER_FULL_URL = 'http://' + CONFIG.APP_HOME_SERVER_DOMAIN + ':' + CONFIG.APP_HOME_SERVER_PORT;
}

// 一键秀网页端服务器设置
if(CONFIG.DEBUG==1) CONFIG.YJX_WEB_SERVER_DOMAIN = 'localhost';       // 开发本地调试
if(CONFIG.DEBUG==2) CONFIG.YJX_WEB_SERVER_DOMAIN = 'test.yijianxiu.com';// 测试服务器
CONFIG.YJX_WEB_SERVER_PORT = 2703;
if (CONFIG.DEBUG == 1) {
    CONFIG.YJX_WEB_SERVER_FULL_URL = 'http://' + CONFIG.YJX_WEB_SERVER_DOMAIN + ':' + CONFIG.YJX_WEB_SERVER_PORT;
}
if(CONFIG.DEBUG == 2) {
    CONFIG.YJX_WEB_SERVER_FULL_URL = 'https://' + CONFIG.YJX_WEB_SERVER_DOMAIN;
}


// 一键生成图片排重服务配置
if(CONFIG.DEBUG === 1) CONFIG.YJSC_IMAGE_HASH_SERVER_DOMAIN = 'test-imagehash.itbour.com'; // 开发本地调试
if(CONFIG.DEBUG === 2) CONFIG.YJSC_IMAGE_HASH_SERVER_DOMAIN = 'test-imagehash.itbour.com'; // 开发本地调试
CONFIG.YJSC_IMAGE_HASH_SERVER_PORT = 3013;
CONFIG.YJSC_IMAGE_HASH_SERVER_RPC_PORT = 4013;
CONFIG.YJSC_IMAGE_HASH_SERVER_FULL_URL = 'https://' + CONFIG.YJSC_IMAGE_HASH_SERVER_DOMAIN;
if(CONFIG.DEBUG === 1) CONFIG.YJSC_IMAGE_HASH_SERVER_FULL_URL +=  ':' + CONFIG.YJSC_IMAGE_HASH_SERVER_PORT;


// 一键秀开放平台配置
CONFIG.YJX_OPEN_API_SERVER_DOMAIN = 'test-openapi.yijianxiu.com';
if(CONFIG.DEBUG === 1) CONFIG.YJX_OPEN_API_SERVER_DOMAIN = 'localhost';
CONFIG.YJX_OPEN_API_SERVER_PORT = 3014;
CONFIG.YJX_OPEN_API_SERVER_RPC_PORT = 4014;
CONFIG.YJX_OPEN_API_SERVER_FULL_URL = 'https://' + CONFIG.YJX_OPEN_API_SERVER_DOMAIN;
if(CONFIG.DEBUG === 1) CONFIG.YJX_OPEN_API_SERVER_FULL_URL += ':' + CONFIG.YJX_OPEN_API_SERVER_PORT;



// 示界港中台服务配置
CONFIG.SJG_MIDDLE_STAGE_SERVER_DOMAIN = 'test-mid.itbour.com';
if (CONFIG.DEBUG === 1) CONFIG.SJG_MIDDLE_STAGE_SERVER_DOMAIN = 'localhost';
CONFIG.SJG_MIDDLE_STAGE_SERVER_PORT = 3016;
CONFIG.SJG_MIDDLE_STAGE_SERVER_RPC_PORT = 4016;
CONFIG.SJG_MIDDLE_STAGE_SERVER_FULL_URL = 'https://' + CONFIG.SJG_MIDDLE_STAGE_SERVER_DOMAIN;
if(CONFIG.DEBUG === 1) CONFIG.SJG_MIDDLE_STAGE_SERVER_FULL_URL = 'http://' + CONFIG.SJG_MIDDLE_STAGE_SERVER_DOMAIN + ':' + CONFIG.SJG_MIDDLE_STAGE_SERVER_PORT;


// 小程序相关服务配置
CONFIG.SJG_MINI_PROGRAMS_SERVER_DOMAIN = 'test-mp.itbour.com';
CONFIG.SJG_MINI_PROGRAMS_SERVER_PROT = 3017;
CONFIG.SJG_MINI_PROGRAMS_SERVER_RPC_PROT = 4017;
CONFIG.SJG_MINI_PROGRAMS_SERVER_FULL_URL = 'https://'+CONFIG.SJG_MINI_PROGRAMS_SERVER_DOMAIN;
if(CONFIG.DEBUG === 1) {
    CONFIG.SJG_MINI_PROGRAMS_SERVER_DOMAIN = 'localhost';
    CONFIG.SJG_MINI_PROGRAMS_SERVER_FULL_URL = 'https://'+CONFIG.SJG_MINI_PROGRAMS_SERVER_DOMAIN+':'+CONFIG.SJG_MINI_PROGRAMS_SERVER_PROT;
}



// 一键秀 java redisCacheManager 服务器器配置
if(CONFIG.DEBUG === 1) CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_DOMAIN = '47.97.22.47';       // 开发本地调试
if(CONFIG.DEBUG === 2) CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_DOMAIN = '47.97.22.47';// 测试服务器
CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_PORT = 1535;
CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_FULL_URL = 'http://' + CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_DOMAIN + ':' + CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_PORT;
CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_PROJECT_NAME = 'redisCacheManager';
CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_BASE_URL = CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_SERVER_FULL_URL + '/' + CONFIG.YJX_JAVA_REDIS_CACHE_MANAGER_PROJECT_NAME;

// 一键秀 java redis search 服务器器配置
if(CONFIG.DEBUG === 1) CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_DOMAIN = '47.97.22.47';       // 开发本地调试
if(CONFIG.DEBUG === 2) CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_DOMAIN = '47.97.22.47';// 测试服务器
CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_PORT = 1535;
CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_FULL_URL = 'http://' + CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_DOMAIN + ':' + CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_PORT;
CONFIG.YJX_JAVA_REDIS_SEARCH_PROJECT_NAME = "YjxSearchProject";
CONFIG.YJX_JAVA_REDIS_SEARCH_BASE_URL = CONFIG.YJX_JAVA_REDIS_SEARCH_SERVER_FULL_URL + '/' + CONFIG.YJX_JAVA_REDIS_SEARCH_PROJECT_NAME;


// qn2oss服务的设置
if(CONFIG.DEBUG==1) CONFIG.QN2OSS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.QN2OSS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

CONFIG.QN2OSS_SERVER_PORT = 8001;
CONFIG.QN2OSS_SERVER_RPC_PORT = 9001;
CONFIG.QN2OSS_REGION_INTERNAL = 'oss-cn-hangzhou-internal';
CONFIG.QN2OSS_REGION = 'oss-cn-hangzhou';
CONFIG.ACCESS_KEY_ID = 'gvmMBtVhdrkVYqAt';
CONFIG.ACCESS_KEY_SECRET = 'BgDhEvnYqU1N3bawYc91Pgahm99umO';
CONFIG.BUCKET_ITBOUR_IMAGE = 'itbour-image'; // for test
CONFIG.BUCKET_ITBOUR_BACK = 'itbour-back';// 后台上传的图片、图形的图片
CONFIG.BUCKET_ITBOUR_USER = 'itbour-user';//  用户上传的音视频、图片
CONFIG.BUCKET_ITBOUR_GENERATE = 'itbour-generate';// 生成结果：模版缩略图、排版结果、视频抽图等
CONFIG.BUCKET_ITBOUR_STATIC = 'itbour-static'; // 静态资源服务器, 暂时存储 web 端图片等静态资源

// 后台使用, 勿动
CONFIG.OSS_DOMAIN_IMAGE = 'http://'+CONFIG.BUCKET_ITBOUR_IMAGE+'.oss-cn-hangzhou.aliyuncs.com';//OSS外网域名
CONFIG.OSS_INTERNAL_DOMAIN_IMAGE = 'http://'+CONFIG.BUCKET_ITBOUR_IMAGE+'.oss-cn-hangzhou-internal.aliyuncs.com';//OSS内网域名
CONFIG.OSS_DOMAIN_BACK = 'http://'+CONFIG.BUCKET_ITBOUR_BACK+'.oss-cn-hangzhou.aliyuncs.com';//OSS外网域名
CONFIG.OSS_INTERNAL_DOMAIN_BACK = 'http://'+CONFIG.BUCKET_ITBOUR_BACK+'.oss-cn-hangzhou-internal.aliyuncs.com';//OSS内网域名
CONFIG.OSS_DOMAIN_USER = 'http://'+CONFIG.BUCKET_ITBOUR_USER+'.oss-cn-hangzhou.aliyuncs.com';//OSS外网域名
CONFIG.OSS_INTERNAL_DOMAIN_USER = 'http://'+CONFIG.BUCKET_ITBOUR_USER+'.oss-cn-hangzhou-internal.aliyuncs.com';//OSS内网域名
CONFIG.OSS_DOMAIN_GENERATE = 'http://'+CONFIG.BUCKET_ITBOUR_GENERATE+'.oss-cn-hangzhou.aliyuncs.com';//OSS外网域名
CONFIG.OSS_INTERNAL_DOMAIN_GENERATE = 'http://'+CONFIG.BUCKET_ITBOUR_GENERATE+'.oss-cn-hangzhou-internal.aliyuncs.com';//OSS内网域名
CONFIG.OSS_DOMAIN_PREFIX = 'http://itbour-';
CONFIG.OSS_DOMAIN_PREFIX_HTTPS = 'https://itbour-';
CONFIG.OSS_DOMAIN_INTERNAL_FLAG = '-internal';
CONFIG.OSS_DOMAIN_INTERNAL_FLAG_LENTH = CONFIG.OSS_DOMAIN_INTERNAL_FLAG.length;
CONFIG.OSS_DOMAIN_FLAG = 'oss-cn-hangzhou';
CONFIG.OSS_DOMAIN_FLAG_LENTH = CONFIG.OSS_DOMAIN_FLAG.length;

// 前端使用,
CONFIG.OSS_DOMAIN_USER_FOR_YJXWEB = 'https://'+CONFIG.BUCKET_ITBOUR_USER+'.oss-cn-hangzhou.aliyuncs.com';//OSS外网域名

// http://itbour-back.oss-cn-hangzhou.aliyuncs.com 映射到itbour域名 http://ossb.itbour.com
CONFIG.OSS_DOMAIN_BACK_MAP = 'http://ossb.itbour.com';//OSS外网域名
// http://itbour-user.oss-cn-hangzhou.aliyuncs.com 映射到itbour域名 http://itbour-user.itbour.com
CONFIG.OSS_DOMAIN_USER_MAP = 'http://'+CONFIG.BUCKET_ITBOUR_USER+'.itbour.com';//OSS外网域名
// http://itbour-generate.oss-cn-hangzhou.aliyuncs.com 映射到itbour域名 http://itbour-generate.itbour.com
CONFIG.OSS_DOMAIN_GENERATE_MAP = 'http://'+CONFIG.BUCKET_ITBOUR_GENERATE+'.itbour.com';//OSS外网域名
// https://itbour-static.oss-cn-hangzhou.aliyuncs.com 映射到itbour域名 https://itbour-static.itbour.com
CONFIG.OSS_DOMAIN_STATIC_MAP = 'https://'+CONFIG.BUCKET_ITBOUR_STATIC+'.itbour.com';//OSS外网域名


CONFIG.OSS_USER_UP = {};// user upload sts config
CONFIG.OSS_USER_UP.AccessKeyId= "1nG1ZtDbxeESp05f";
CONFIG.OSS_USER_UP.AccessKeySecret="FnI7O5rUerrYfBRKiJirKftImJshk0";
CONFIG.OSS_USER_UP.RoleArn="acs:ram::1093949836817931:role/oss-itb-user-readwrite-role";
CONFIG.OSS_USER_UP.TokenExpireTime="900";
CONFIG.OSS_USER_UP.Itbour_Get_Put_Policy = {
    "Statement": [
        {
            "Action": [
                "oss:GetObject",
                "oss:PutObject"
            ],
            "Effect": "Allow",
            "Resource": ["acs:oss:*:*:itbour-user/*"]
        }
    ],
    "Version": "1"
};

/*图片鉴黄相关*/
CONFIG.OSS_GREEN_IMAGE = {};
CONFIG.OSS_GREEN_IMAGE.AccessKeyId = 'LTAIrz3iDi8VsybT';
CONFIG.OSS_GREEN_IMAGE.AccessKeySecret = 'nsw2pzwy4IBRVYXEt76J1GpnIqOMwF';
CONFIG.OSS_GREEN_IMAGE.Version = '2017-01-12';
CONFIG.OSS_GREEN_IMAGE.Hostname = 'green.cn-shanghai.aliyuncs.com';
CONFIG.OSS_GREEN_IMAGE.Path = '/green/image/scan';

/*小程序上传 key sec*/
CONFIG.OSS_MP_UPLOAD = {};
CONFIG.OSS_MP_UPLOAD.AccessKeyId = 'LTAItEC23XAwcndH';
CONFIG.OSS_MP_UPLOAD.AccessKeySecret = 'vlLi1zlElqNhgIXh1is4Nod8JGcFy2';


CONFIG.QINIU_DOMAIN = 'http://7xogoq.com2.z0.glb.qiniucdn.com'; // Qiniu抬头
CONFIG.QINIU_DOMAIN_LEN = CONFIG.QINIU_DOMAIN.length;
CONFIG.QINIU_DOMAIN_PREFIX = 'http://7xogoq';// Qiniu抬头


// 下载图片的redis的设置
if(CONFIG.DEBUG==1) CONFIG.REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.REDIS_SERVER_PORT = 6379;
CONFIG.REDIS_SERVER_DB_NAME = '0';
CONFIG.REDIS_SERVER_TTL = 3600*24*15;

// 缓存数据的redis的设置
if(CONFIG.DEBUG==1) CONFIG.CACHE_REDIS_SERVER_DOMAIN = '47.97.22.47';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.CACHE_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.CACHE_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.CACHE_REDIS_SERVER_PORT = 6379;
CONFIG.CACHE_REDIS_SERVER_DB_NAME = '1';
CONFIG.CACHE_REDIS_SERVER_TTL = 3600*24*15;


// session-redis的设置 for kingsoft
if(CONFIG.DEBUG==1) CONFIG.SESSION_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.SESSION_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.SESSION_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.SESSION_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.SESSION_REDIS_SERVER_PORT = 6379;
CONFIG.SESSION_REDIS_SERVER_DB_NUMBER = 1;
CONFIG.SESSION_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.SESSION_REDIS_SERVER_PREFIX = 'itbour_kingsoft_sess:';

// session-redis的设置 for home
if(CONFIG.DEBUG==1) CONFIG.HOME_SESSION_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.HOME_SESSION_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.HOME_SESSION_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.HOME_SESSION_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.HOME_SESSION_REDIS_SERVER_PORT = 6379;
CONFIG.HOME_SESSION_REDIS_SERVER_DB_NUMBER = 2;
CONFIG.HOME_SESSION_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.HOME_SESSION_REDIS_SERVER_PREFIX = 'itbour_home_sess:';

// session-redis的设置 for design
if(CONFIG.DEBUG==1) CONFIG.DESIGN_SESSION_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.DESIGN_SESSION_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.DESIGN_SESSION_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.DESIGN_SESSION_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.DESIGN_SESSION_REDIS_SERVER_PORT = 6379;
CONFIG.DESIGN_SESSION_REDIS_SERVER_DB_NUMBER = 3;
CONFIG.DESIGN_SESSION_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.DESIGN_SESSION_REDIS_SERVER_PREFIX = 'itbour_design_sess:';

// session-redis的设置 for API
if(CONFIG.DEBUG==1) CONFIG.API_SESSION_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.API_SESSION_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.API_SESSION_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.API_SESSION_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.API_SESSION_REDIS_SERVER_PORT = 6379;
CONFIG.API_SESSION_REDIS_SERVER_DB_NUMBER = 4;
CONFIG.API_SESSION_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.API_SESSION_REDIS_SERVER_PREFIX = 'itbour_api_sess:';

// session-redis的设置 for Ver_Code(验证码)
if(CONFIG.DEBUG==1) CONFIG.VCODE_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.VCODE_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.VCODE_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.VCODE_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.VCODE_REDIS_SERVER_PORT = 6379;
CONFIG.VCODE_REDIS_SERVER_DB_NUMBER = 5;
CONFIG.VCODE_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.VCODE_REDIS_SERVER_PREFIX = 'itbour_vcode_rds:';

// session-redis的设置 for Timer(订单自动关闭／收货倒计时)
if(CONFIG.DEBUG==1) CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_PORT = 6379;
CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_DB_NUMBER = 6;
CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.TRADE_ODR_UPD_STA_REDIS_SERVER_PREFIX = 'itb_trade_odr_upd_sta_rds:';

// session-redis的设置 for Coupon(APP抽奖用)
if(CONFIG.DEBUG==1) CONFIG.COUPON_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.COUPON_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.COUPON_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.COUPON_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.COUPON_REDIS_SERVER_PORT = 6379;
CONFIG.COUPON_REDIS_SERVER_DB_NUMBER = 7;
CONFIG.COUPON_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.COUPON_REDIS_SERVER_PREFIX = 'itbour_coupon_rds:';

// session-redis的设置 for Coupon2(城市合伙人抽奖用_印品券)
if(CONFIG.DEBUG==1) CONFIG.COUPON2_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.COUPON2_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.COUPON2_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.COUPON2_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.COUPON2_REDIS_SERVER_PORT = 6379;
CONFIG.COUPON2_REDIS_SERVER_DB_NUMBER = 8;
CONFIG.COUPON2_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.COUPON2_REDIS_SERVER_PREFIX = 'itbour_coupon2_rds:';

// session-redis的设置 for Coupon3(城市合伙人抽奖用_vip券)
if(CONFIG.DEBUG==1) CONFIG.COUPON3_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.COUPON3_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG==1) CONFIG.COUPON3_REDIS_SERVER_PASSWORD = '';
else if(CONFIG.DEBUG==2) CONFIG.COUPON3_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';// 测试服务器

CONFIG.COUPON3_REDIS_SERVER_PORT = 6379;
CONFIG.COUPON3_REDIS_SERVER_DB_NUMBER = 9;
CONFIG.COUPON3_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.COUPON3_REDIS_SERVER_PREFIX = 'itbour_coupon3_rds:';


// 秒杀的redis的设置
if(CONFIG.DEBUG==1) CONFIG.ACTIVITY_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.ACTIVITY_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.ACTIVITY_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.ACTIVITY_REDIS_SERVER_PORT = 6379;
CONFIG.ACTIVITY_REDIS_SERVER_DB_NUMBER = 0;
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.ACTIVITY_REDIS_SERVER_DB_NUMBER = 10;
}
CONFIG.ACTIVITY_REDIS_SERVER_TTL = 3600*24*30;

// (各种)优惠券的redis的设置
if(CONFIG.DEBUG==1) CONFIG.COUPONS_REDIS_SERVER_DOMAIN = '127.0.0.1';// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.COUPONS_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.COUPONS_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.COUPONS_REDIS_SERVER_PORT = 6379;
CONFIG.COUPONS_REDIS_SERVER_DB_NUMBER = 1;
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.COUPONS_REDIS_SERVER_DB_NUMBER = 11;
}
CONFIG.COUPONS_REDIS_SERVER_TTL = 3600*24*30;
CONFIG.COUPONS_REDIS_SERVER_PREFIX = 'itbour_coupons_rds:';



// lua search的redis1的设置
if(CONFIG.DEBUG==1) CONFIG.LUA_SEARCH_REDIS_SERVER_DOMAIN = '47.97.22.47';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.LUA_SEARCH_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.LUA_SEARCH_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.LUA_SEARCH_REDIS_SERVER_PORT = 6379;
CONFIG.LUA_SEARCH_REDIS_SERVER_DB_NUMBER = 2;
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.LUA_SEARCH_REDIS_SERVER_DB_NUMBER = 12;
}
CONFIG.LUA_SEARCH_REDIS_SERVER_TTL = 3600*24*30*12;

// lua search的redis2的设置
CONFIG.LUA_SEARCH_REDIS2_SERVER_DOMAIN = CONFIG.LUA_SEARCH_REDIS_SERVER_DOMAIN;
CONFIG.LUA_SEARCH_REDIS2_SERVER_PASSWORD = CONFIG.LUA_SEARCH_REDIS_SERVER_PASSWORD;
CONFIG.LUA_SEARCH_REDIS2_SERVER_PORT = CONFIG.LUA_SEARCH_REDIS_SERVER_PORT;
CONFIG.LUA_SEARCH_REDIS2_SERVER_DB_NUMBER = 3;  // 与"lua search的redis1"相比只有db号不同
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.LUA_SEARCH_REDIS2_SERVER_DB_NUMBER = 13;
}
CONFIG.LUA_SEARCH_REDIS2_SERVER_TTL = CONFIG.LUA_SEARCH_REDIS_SERVER_TTL;

// lua search的redis-config的设置
CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_DOMAIN = CONFIG.LUA_SEARCH_REDIS_SERVER_DOMAIN;
CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_PASSWORD = CONFIG.LUA_SEARCH_REDIS_SERVER_PASSWORD;
CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_PORT = CONFIG.LUA_SEARCH_REDIS_SERVER_PORT;
CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_DB_NUMBER = 4; // 与"lua search的redis1"相比只有db号不同
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_DB_NUMBER = 14;
}
CONFIG.LUA_SEARCH_REDIS_CONFIG_SERVER_TTL = CONFIG.LUA_SEARCH_REDIS_SERVER_TTL;

// lab search的设置
if(CONFIG.DEBUG==1) CONFIG.LAB_SEARCH_REDIS_SERVER_DOMAIN = '127.0.0.1';       // 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.LAB_SEARCH_REDIS_SERVER_DOMAIN = '47.97.22.47';// 测试服务器

if(CONFIG.DEBUG) CONFIG.LAB_SEARCH_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';

CONFIG.LAB_SEARCH_REDIS_SERVER_PORT = 6379;
CONFIG.LAB_SEARCH_REDIS_SERVER_DB_NUMBER = 5;
// 测试环境只有一台 redis , 故 DB number 持续累计
if(CONFIG.DEBUG) {
    CONFIG.LAB_SEARCH_REDIS_SERVER_DB_NUMBER = 15;
}
CONFIG.LAB_SEARCH_REDIS_SERVER_TTL = 3600*24*30*12;

//============================ 一键秀 redis begin ==================================
// 本地 一键秀 redis 配置
if(CONFIG.DEBUG === 1) {
    // config db
    CONFIG.YJX_SEARCH_REDIS_CONFIG_DOMAIN = '127.0.0.1';
    CONFIG.YJX_SEARCH_REDIS_CONFIG_PASSWORD = '';
    CONFIG.YJX_SEARCH_REDIS_CONFIG_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CONFIG_DB_NUMBER = 16;
    CONFIG.YJX_SEARCH_REDIS_CONFIG_TTL = 3600*24*30*12;

    // search 1
    CONFIG.YJX_SEARCH_REDIS_CACHE1_DOMAIN = '127.0.0.1';
    CONFIG.YJX_SEARCH_REDIS_CACHE1_PASSWORD = '';
    CONFIG.YJX_SEARCH_REDIS_CACHE1_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CACHE1_DB_NUMBER = 17;
    CONFIG.YJX_SEARCH_REDIS_CACHE1_TTL = 3600*24*30*12;

    // search 0
    CONFIG.YJX_SEARCH_REDIS_CACHE2_DOMAIN = '127.0.0.1';
    CONFIG.YJX_SEARCH_REDIS_CACHE2_PASSWORD = '';
    CONFIG.YJX_SEARCH_REDIS_CACHE2_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CACHE2_DB_NUMBER = 18;
    CONFIG.YJX_SEARCH_REDIS_CACHE2_TTL = 3600*24*30*12;

    // API 接口返回值静态化 redis 配置, 默认缓存15天
    CONFIG.YJX_STATICIZE_REDIS_DOMAIN = '127.0.0.1';
    CONFIG.YJX_STATICIZE_REDIS_PASSWORD = '';
    CONFIG.YJX_STATICIZE_REDIS_PORT = 6379;
    CONFIG.YJX_STATICIZE_REDIS_DB_NUMBER = 19;
    CONFIG.YJX_STATICIZE_REDIS_TTL = 3600*24*15;


    // 视频服务下载图片的redis的设置－ 开发本地调试
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DOMAIN = '127.0.0.1';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PASSWORD = '';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PORT = 6379;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DB_NUMBER = 20;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_TTL = 3600*24*15;

    // 视频服务下载图片的redis的设置-测试服务器
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DOMAIN = '127.0.0.1';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PASSWORD = '';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PORT = 6379;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DB_NUMBER = 20;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_TTL = 3600*24*15;

    //======================= java 配置 begin =========================
    // 一键秀java 的模板缓存 config db
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_DOMAIN = '127.0.0.1';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_PASSWORD = '';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_DB_NUMBER = 21;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_TTL = 3600*24*30*12;

    // 一键秀java 的模板缓存 cache1
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_DOMAIN = '127.0.0.1';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_PASSWORD = '';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_DB_NUMBER = 22;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_TTL = 3600*24*30*12;

    // 一键秀java 的模板缓存 cache2
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_DOMAIN = '127.0.0.1';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_PASSWORD = '';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_DB_NUMBER = 23;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_TTL = 3600*24*30*12;

    // 一键秀 java 与 api 共用的接口缓存 redis
    CONFIG.YJX_JAVA_API_STATICIZE_DOMAIN = '127.0.0.1';
    CONFIG.YJX_JAVA_API_STATICIZE_PASSWORD = '';
    CONFIG.YJX_JAVA_API_STATICIZE_PORT = 6379;
    CONFIG.YJX_JAVA_API_STATICIZE_DB_NUMBER = 25;
    CONFIG.YJX_JAVA_API_STATICIZE_TTL = 3600*24*15;

    //======================= java 配置 end =========================

    // 一键秀 web session 缓存
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_DOMAIN = '127.0.0.1';
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PASSWORD = '';
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PORT = 6379;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_DB_NUMBER = 24;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_TTL = 3600*24*30;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PREFIX = 'yjx_home_session:';


}
// 测试服务器 一键秀 redis 配置
else if (CONFIG.DEBUG === 2) {
    // config db
    CONFIG.YJX_SEARCH_REDIS_CONFIG_DOMAIN = '47.97.22.47';
    CONFIG.YJX_SEARCH_REDIS_CONFIG_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_SEARCH_REDIS_CONFIG_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CONFIG_DB_NUMBER = 16;
    CONFIG.YJX_SEARCH_REDIS_CONFIG_TTL = 3600*24*30*12;

    // search 1
    CONFIG.YJX_SEARCH_REDIS_CACHE1_DOMAIN = '47.97.22.47';
    CONFIG.YJX_SEARCH_REDIS_CACHE1_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_SEARCH_REDIS_CACHE1_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CACHE1_DB_NUMBER = 17;
    CONFIG.YJX_SEARCH_REDIS_CACHE1_TTL = 3600*24*30*12;

    // search 2
    CONFIG.YJX_SEARCH_REDIS_CACHE2_DOMAIN = '47.97.22.47';
    CONFIG.YJX_SEARCH_REDIS_CACHE2_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_SEARCH_REDIS_CACHE2_PORT = 6379;
    CONFIG.YJX_SEARCH_REDIS_CACHE2_DB_NUMBER = 18;
    CONFIG.YJX_SEARCH_REDIS_CACHE2_TTL = 3600*24*30*12;

    // API 接口返回值静态化 redis 配置, 默认缓存15天
    CONFIG.YJX_STATICIZE_REDIS_DOMAIN = '47.97.22.47';
    CONFIG.YJX_STATICIZE_REDIS_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_STATICIZE_REDIS_PORT = 6379;
    CONFIG.YJX_STATICIZE_REDIS_DB_NUMBER = 19;
    CONFIG.YJX_STATICIZE_REDIS_TTL = 3600*24*15;


    // 视频服务下载图片的redis的设置-测试服务器
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DOMAIN = '47.97.22.47';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_PORT = 6379;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_DB_NUMBER = 20;
    CONFIG.YJX_VIDEO_DOWNLOAD_IMG_REDIS_TTL = 3600*24*15;

    //======================= java 配置 begin =========================
    // 一键秀java 的模板缓存 config db
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_DOMAIN = '47.97.22.47';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_DB_NUMBER = 21;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CONFIG_TTL = 3600*24*30*12;

    // 一键秀java 的模板缓存 cache1
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_DOMAIN = '47.97.22.47';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_DB_NUMBER = 22;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE1_TTL = 3600*24*30*12;

    // 一键秀java 的模板缓存 cache2
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_DOMAIN = '47.97.22.47';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_PORT = 6379;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_DB_NUMBER = 23;
    CONFIG.YJX_JAVA_SEARCH_REDIS_CACHE2_TTL = 3600*24*30*12;

    // 一键秀 java 与 api 共用的接口缓存 redis
    CONFIG.YJX_JAVA_API_STATICIZE_DOMAIN = '47.97.22.47';
    CONFIG.YJX_JAVA_API_STATICIZE_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_JAVA_API_STATICIZE_PORT = 6379;
    CONFIG.YJX_JAVA_API_STATICIZE_DB_NUMBER = 25;
    CONFIG.YYJX_JAVA_API_STATICIZE_TTL = 3600*24*15;

    //======================= java 配置 end =========================

    // 一键秀 web session 缓存
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_DOMAIN = '47.97.22.47';
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PASSWORD = 'yjxRedisPssw123';
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PORT = 6379;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_DB_NUMBER = 24;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_TTL = 3600*24*30;
    CONFIG.YJX_WEB_SESSION_REDIS_SERVER_PREFIX = 'yjx_home_session:';

}

// 视频生成进度记录 redis 配置
CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_DOMAIN = '47.97.22.47';
CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_PORT = 6379;
CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_DB_NUMBER = 26;
CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_TTL = 3600*24*15;
if (CONFIG.DEBUG === 1) {
    CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_DOMAIN = '127.0.0.1';
    CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_PASSWORD = '';
    CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_PORT = 6379;
    CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_DB_NUMBER = 0;
    CONFIG.YJX_VIDEO_RENDER_PROGRESS_REDIS_TTL = 3600*24*15;

}
//============================ 一键秀 redis end ==================================


// 一键生成java 的模板缓存 config db
CONFIG.YJSC_JAVA_SEARCH_REDIS_CONFIG_DOMAIN = '47.97.22.47';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CONFIG_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CONFIG_PORT = 6379;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CONFIG_DB_NUMBER = 27;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CONFIG_TTL = 3600*24*30*12;

// 一键秀java 的模板缓存 cache1
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE1_DOMAIN = '47.97.22.47';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE1_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE1_PORT = 6379;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE1_DB_NUMBER = 28;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE1_TTL = 3600*24*30*12;

// 一键秀java 的模板缓存 cache2
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE2_DOMAIN = '47.97.22.47';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE2_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE2_PORT = 6379;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE2_DB_NUMBER = 29;
CONFIG.YJSC_JAVA_SEARCH_REDIS_CACHE2_TTL = 3600*24*30*12;

// 一键生成图片排重的 configDB
CONFIG.YJSC_IMAGE_HASH_REDIS_DOMAIN = '47.97.22.47';
CONFIG.YJSC_IMAGE_HASH_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJSC_IMAGE_HASH_REDIS_PORT = 6379;
CONFIG.YJSC_IMAGE_HASH_REDIS_CONFIG_DB_NUMBER = 30;
CONFIG.YJSC_IMAGE_HASH_REDIS_TTL = 3600*24*30*12*3;

// 一键生成图片排重的 hash 缓存(缓存时间暂定三年)
CONFIG.YJSC_IMAGE_HASH_REDIS_DOMAIN = '47.97.22.47';
CONFIG.YJSC_IMAGE_HASH_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJSC_IMAGE_HASH_REDIS_PORT = 6379;
CONFIG.YJSC_IMAGE_HASH_REDIS_DB_NUMBER = 31;
CONFIG.YJSC_IMAGE_HASH_REDIS_TTL = 3600*24*30*12*3;


// ---- 一键秀开放平台 token  redis 配置 ---------------------
CONFIG.YJX_OPEN_API_TOKEN_REDIS_DOMAIN = '47.97.22.47';
CONFIG.YJX_OPEN_API_TOKEN_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJX_OPEN_API_TOKEN_REDIS_PORT = 6379;
CONFIG.YJX_OPEN_API_TOKEN_REDIS_DB_NUMBER = 32;
CONFIG.YJX_OPEN_API_TOKEN_REDIS_TTL = 3600*24*30*12*3;


// ------------ 一键秀数据统计 redis 配置开始 ------------------
CONFIG.YJX_DATA_STATISTICS_REDIS_DOMAIN = '47.97.22.47';
CONFIG.YJX_DATA_STATISTICS_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.YJX_DATA_STATISTICS_REDIS_PORT = 6379;
CONFIG.YJX_DATA_STATISTICS_REDIS_DB_NUMBER = 33;
CONFIG.YJX_DATA_STATISTICS_REDIS_TTL = 3600*24*30*12*3;
// ------------ 一键秀数据统计 redis 配置结束 ------------------


// ---------------- 示界港中台服务 session redis 配置 ---------------
CONFIG.SJG_MIDDLE_STAGE_REDIS_DOMAIN = '47.97.22.47';
CONFIG.SJG_MIDDLE_STAGE_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.SJG_MIDDLE_STAGE_REDIS_PORT = 6379;
CONFIG.SJG_MIDDLE_STAGE_REDIS_DB_NUMBER = 34;
CONFIG.SJG_MIDDLE_STAGE_REDIS_TTL = 3600*24*15;
CONFIG.SJG_MIDDLE_STAGE_REDIS_SERVER_PREFIX = 'middle-stage:';
// ---------------- 示界港中台服务 session redis 配置 ---------------

// ---------------- 示界港小程序 session redis 配置 ---------------
CONFIG.SJG_MINI_PROGRAMS_REDIS_DOMAIN = '47.97.22.47';
if(CONFIG.DEBUG===1) CONFIG.SJG_MINI_PROGRAMS_REDIS_DOMAIN = '127.0.0.1';
CONFIG.SJG_MINI_PROGRAMS_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.SJG_MINI_PROGRAMS_REDIS_PORT = 6379;
CONFIG.SJG_MINI_PROGRAMS_REDIS_DB_NUMBER = 35;
CONFIG.SJG_MINI_PROGRAMS_REDIS_TTL = 3600*24*15;
CONFIG.SJG_MINI_PROGRAMS_REDIS_SERVER_PREFIX = 'mini-programs:';
// ---------------- 示界港小程序 session redis 配置 ---------------

// ---------------- 示界港图片活动 redis 配置 ---------------
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_DOMAIN = '47.97.22.47';
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_PORT = 6379;
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_DB_NUMBER = 36;
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_TTL = 3600*24*30*12*2; // 缓存两年
CONFIG.SJG_ACT_IMAGE_PRAISE_REDIS_SERVER_PREFIX = 'act-img:';
// ---------------- 示界港图片活动 redis 配置 ---------------

// ---------------- 示界港 203 文字转视频, 音频识别 配置 ---------------
CONFIG.SJG_MP_203_AUDIO_REDIS_DOMAIN = '47.97.22.47';
if(CONFIG.DEBUG===1) CONFIG.SJG_MP_203_AUDIO_REDIS_DOMAIN = '127.0.0.1';
CONFIG.SJG_MP_203_AUDIO_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.SJG_MP_203_AUDIO_REDIS_PORT = 6379;
CONFIG.SJG_MP_203_AUDIO_REDIS_DB_NUMBER = 37;
CONFIG.SJG_MP_203_AUDIO_REDIS_TTL = 3600*24*15;
CONFIG.SJG_MP_203_AUDIO_REDIS_SERVER_PREFIX = 'a2v_';
// ---------------- 示界港 203 文字转视频, 音频识别 配置 ---------------






// 下载模块的缓存文件的地址
if(CONFIG.DEBUG==1) CONFIG.CACHE_OF_DOWNLOADER_DIR = "/Users/itbour/Desktop/cache/";// 开发本地调试
else if(CONFIG.DEBUG==2) CONFIG.CACHE_OF_DOWNLOADER_DIR = "/nas/nas1/test/download/";// 外网部署

// 小程序203音频文件缓存地址目录
CONFIG.SJG_MP_203_AUDIO_DIR = '/nas/nas1/mp/203/';
if(CONFIG.DEBUG===1)CONFIG.SJG_MP_203_AUDIO_DIR = path.resolve(__dirname, '../miniPrograms/public/audio')+'/';



//------------------------------------------------------------------
CONFIG.UUID_SUFFIX = {};
CONFIG.UUID_SUFFIX.KINGSOFT = "-kingsoftmhds";
CONFIG.UUID_SUFFIX.HOME = "-pc";
CONFIG.UUID_SUFFIX.MP = "-mp";       //小程序唯一标识
//------------------------------------------------------------------

// 字体列表
CONFIG.FONT_LIST = {};
CONFIG.ADD_FONT=function(name,path){CONFIG.FONT_LIST[name]=path;}
CONFIG.GET_FONT= function (name) {return CONFIG.FONT_LIST[name];}
// 字体转换表
CONFIG.FONT_PPTX_INFO_LIST={}
CONFIG.ADD_FONT_INFO=function(name,path){CONFIG.FONT_PPTX_INFO_LIST[name]=path;}
CONFIG.GET_FONT_INFO= function (name) {return CONFIG.FONT_PPTX_INFO_LIST[name];}


// 图片存储地址-auto服务使用
CONFIG.DOWNLOAD_IAMGE_DIR = "./public/downlaod/image/";


// 生成图片时的临时文件夹地址-image服务使用
CONFIG.CREATE_IAMGE_DIR = "./public/create/image/";
// [废弃20180329]生成视频时的临时文件夹地址-video服务使用
CONFIG.CREATE_VIDEO_DIR = "./public/create/video/";
// 生成视频时的临时文件夹地址-video服务使用
if(CONFIG.DEBUG==1) CONFIG.CREATE_VIDEO_DIR2 = "./public/create/video/"; // 本地开发环境
else if(CONFIG.DEBUG==2) CONFIG.CREATE_VIDEO_DIR2 = "/nas/nas1/test/create/video/"; // 外网测试环境


// 消息
CONFIG.ERR_MESSAGE = {};
CONFIG.ERR_MESSAGE.EXCEPTION = "**************Exception*******";



// id-class map
CONFIG.CLASS_LIB={};
CONFIG.REGIST_CLASS=function(ID,CLASS){CONFIG.CLASS_LIB[ID]=CLASS;}
CONFIG.NEW_CLASS_OBJ=function(ID,PARA){return new CONFIG.CLASS_LIB[ID](PARA);}

// 取贺卡模版ID
CONFIG.GET_CARD_TEMPLATE_ID = function(type){
    var docIds = [
        [583,610],// 第一类模版 男神
        [106,547],// 第二类模版 女神
        [431,589],// 第三类模版 兄弟
        [429,544],// 第四类模版 闺蜜
        [309,559],// 第五类模版 亲友
        [579,584],// 第六类模版 同学
    ];

    var typeNum = Number(type) || 5;
    if (typeNum > docIds.length){
        typeNum = 5;
    }

    var ids = docIds[typeNum-1];
    return ids[Math.floor(Math.random()*ids.length)];
}

// 签文
CONFIG.ARR_DRAWLOTS_ITEMS = [
    [],// 0:blank
    ["A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","A11","A12","A13","A14","A15",
        "A16","A17","A18","A19","A20","A21","A22","A23","A24","A25","A26","A27","A28","A29"],// 1:爱情
    ["C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","C11","C12","C13","C14","C15",
        "C16","C17","C18","C19","C20","C21","C22","C23","C24","C25","C26","C27","C28","C29","C30"],// 2:财运
    ["J1","J2","J3","J4","J5","J6","J7","J8","J9","J10","J11","J12","J13","J14","J15",
        "J16","J17","J18","J19","J20","J21","J22","J23","J24","J25","J26","J27","J28","J29","J30"],// 3:健康
    ["S1","S2","S3","S4","S5","S6","S7","S8","S9","S10","S11","S12","S13","S14","S15",
        "S16","S17","S18","S19","S20","S21","S22","S23","S24","S25","S26","S27","S28","S29","S30"]// 4:事业
];
CONFIG.ARR_DRAWLOTS_TYPE = ["","aq","cy","jk","sy"];

CONFIG.GET_WISH_MSG = function(){
    var arrMsg = [
        '事事如意！','岁岁平安！','新年快乐！','身体健康！','工作顺利！',
        '吉祥如意！','步步高升！','财源广进！','合家幸福！','恭喜发财！',
        '大吉大利！','新年吉祥！','前程似锦！','吉星高照！','财运亨通！',
        '合家欢乐！','飞黄腾达！','福如东海！','寿比南山！','幸福美满！',
        '美梦连连！'
    ];

    var i = Math.floor(Math.random()*arrMsg.length);
    return arrMsg[i];
};



// '订单状态:10待支付、11已支付、12支付失败、20制作中、30配送中、40完成、50取消',
CONFIG.TRADE_ORDER_STATE_NOT_PAY = 10;
CONFIG.TRADE_ORDER_STATE_PAY_SUCCESS = 11;
CONFIG.TRADE_ORDER_STATE_PAY_FAIL = 12;
CONFIG.TRADE_ORDER_STATE_PRINT = 20;
CONFIG.TRADE_ORDER_STATE_MAIL = 30;
CONFIG.TRADE_ORDER_STATE_DONE = 40;
CONFIG.TRADE_ORDER_STATE_CANCEL = 50;

// 订单支付自动关闭（取消）倒计时：24小时
if(CONFIG.DEBUG) CONFIG.TRADE_ORDER_AUTO_CLOSE_HOUR_LIMIT = 60/60;// 60min
else CONFIG.TRADE_ORDER_AUTO_CLOSE_HOUR_LIMIT = 24;
CONFIG.JOB_TRADE_ORDER_AUTO_CLOSE_LOOP_MIN = [0,30];// job循环频率: 每小时两次
// 订单自动完成倒计时：7天
if(CONFIG.DEBUG) CONFIG.TRADE_ORDER_DONE_CLOSE_DAY_LIMIT = 120/1440;// 120min
else CONFIG.TRADE_ORDER_DONE_CLOSE_DAY_LIMIT = 7;
CONFIG.JOB_TRADE_ORDER_AUTO_DONE_LOOP_HOUR = [6,18];// job循环频率: 每天两次 6点／18点
// 秒杀订单自动解锁
CONFIG.JOB_SECKILL_ORDER_AUTO_UNLOCK_LOOP_MIN = [// job循环频率: 每小时30次
    0,  2, 4, 6, 8,10,12,14,16,18,
    20,22,24,26,28,30,32,34,36,38,
    40,42,44,46,48,50,52,54,56,58
];

// 自动更新物流信息
CONFIG.JOB_UPD_EXPRESS_TRACK_INFO_HOUR = [11,23];// job循环频率: 每天两次 11点／23点


// 订单的发票的包邮金额，单位：RMB分
CONFIG.INVOICE_ORDER_REMIT_THRESHOLD = 50000;
// 订单的发票的邮费金额，单位：RMB分
CONFIG.INVOICE_ORDER_MAIL_FEE = 1200;


// 订单的发票的类型：订单(创建订单编号时使用的)
CONFIG.ORDER_TYPE_ORDER =1;
// 订单的发票的类型：发票订单(创建订单编号时使用的)
CONFIG.ORDER_TYPE_INVOICE =2;
// 订单的发票的类型：模版订单(创建订单编号时使用的)
CONFIG.ORDER_TYPE_TEMPLATE =3;
// 订单的发票的类型：虚拟商品VIP订单(创建订单编号时使用的)
CONFIG.ORDER_TYPE_VIP =4;
// 订单的发票的类型：秒杀商品订单(创建订单编号时使用的)
CONFIG.ORDER_TYPE_SECKILL =5;

// DB 中存储的订单类型:
// 商品订单为10
// 发票订单为20
// 购买模版订单为30
// 虚拟商品vip订单为40
// 秒杀活动订单为50
CONFIG.ORDER_TYPE_DB_TRADE = 10;
CONFIG.ORDER_TYPE_DB_INVOICE = 20;
CONFIG.ORDER_TYPE_DB_TEMPLATE = 30;
CONFIG.ORDER_TYPE_DB_VIP = 40;
CONFIG.ORDER_TYPE_DB_SECKILL = 50;


// 单个用户提交申请成为合作伙伴的时间间隔: 5 分钟, 单位秒
CONFIG.APPLY_TO_BE_PARTNER_TIME_LIMIT= 5 * 60;




// 1.单页  2.多页  3.ppt  4.印品  6.社交媒体  7.电商  8.微商 1010. logo 1011 营销商品
CONFIG.DOC_TYPE_1 = 1;
CONFIG.DOC_TYPE_2 = 2;
CONFIG.DOC_TYPE_3 = 3;
CONFIG.DOC_TYPE_4 = 4;
CONFIG.DOC_TYPE_6 = 6;
CONFIG.DOC_TYPE_7 = 7;
CONFIG.DOC_TYPE_8 = 8;
CONFIG.DOC_TYPE_1010 = 1010;
CONFIG.DOC_TYPE_1011 = 1011;


// 发票订单显示的内容
CONFIG.INVOICE_ORDER_CONTENT = "服务费";// "印刷费"

// 印品商品预览图宽高
CONFIG.PRINT_ITEM_PREVIEW_WIDTH  = 344;
CONFIG.PRINT_ITEM_PREVIEW_HEIGHT = 204;


// 新年活动的设计模版的id列表
CONFIG.NEW_YEAR_DESIGN_IDS_2017 = [433,429,434,436,437,447,459,460,464,465];
CONFIG.NEW_YEAR_DESIGN_IDS_2017_INDEXS = [];
for(var i=0;i<CONFIG.NEW_YEAR_DESIGN_IDS_2017.length;i++){ CONFIG.NEW_YEAR_DESIGN_IDS_2017_INDEXS.push(i); }


//----------------------------------------配送地区、费用相关 start--------------------------------------------------------
/*
 配送地区                                                  首重费用(元) 续重费用(元)
 0类 湖北（武汉）                                                  5       1
 1类 上海、安徽、河南、湖北（除恩施／十堰）、湖南、江苏、江西、浙江       5       1.5
 2类 北京、天津、福建、广东、河北、湖北（恩施／十堰）、山东              5       2
 3类 重庆、广西、贵州、黑龙江、吉林、辽宁、山西、陕西、四川、云南         5       4
 4类 甘肃、海南、内蒙古、宁夏、青海                                   8       6
 5类 西藏、新疆                                                    15      15
 */
CONFIG.MAIL = {};

// 地区个数
CONFIG.MAIL.AREA_CLASS_LEN = 6;

// 邮费配置
// key：地区分类 value：数组，0-首重费用，1-续重费用
CONFIG.MAIL.FEE_MAP = {
    "0":[5,1],
    "1":[5,1.5],
    "2":[5,2],
    "3":[5,4],
    "4":[8,6],
    "5":[15,15]
};
// 邮寄区域
// key：地区分类 value：数组，每个元素是：0-省id，1-市id的数组（null表示使用该省下的所有市id），2-需要排除的该省的市的列表（可以为null）
CONFIG.MAIL.ADDRESS_MAP = {
    "0":[[420000,[420100],null]],
    "1":[[310000,null,null],[340000,null,null],[410000,null,null],[420000,null,[420300,422800]],[430000,null,null],[320000,null,null],[360000,null,null],[330000,null,null]],
    "2":[[110000,null,null],[120000,null,null],[350000,null,null],[440000,null,null],[130000,null,null],[420000,[420300,422800],null],[370000,null,null]],
    "3":[[500000,null,null],[450000,null,null],[520000,null,null],[230000,null,null],[220000,null,null],[210000,null,null],[140000,null,null],[610000,null,null],[510000,null,null],[530000,null,null]],
    "4":[[620000,null,null],[460000,null,null],[150000,null,null],[640000,null,null],[630000,null,null]],
    "5":[[540000,null,null],[650000,null,null]]
};

/*
    功能：计算邮费
    参数：prov 省id
    参数：city 市id
    参数：weight 重量
    返回：邮费，失败返回null
 */
CONFIG.MAIL.calc = function(prov, city, weight){
    // 获取地区分类
    function getAddressClass(p,c){
        var cls = null;
        for(var i=0;i<CONFIG.MAIL.AREA_CLASS_LEN;i++){
            var lst = CONFIG.MAIL.ADDRESS_MAP[i];
            var len2 = lst.length;
            for(var j=0;j<len2;j++){
                var one = lst[j];
                var PROV = one[0];// 省
                var CITIES = one[1];// 市列表（null表示该省下的所有市）
                var EXCEPTS = one[2];// 排除列表(null表示不存在需要排除的市区)


                if(PROV!=p)     continue;// 省份不匹配，继续查找
                if(EXCEPTS && city && (EXCEPTS.indexOf(city)>=0) ) continue;// 排除列表存在，且市在列表中，继续查找
                if(CITIES && city && (CITIES.indexOf(city)<0) )    continue;// 市列表存在，且市不在列表中，继续查找

                return i;
            }
        }

        return cls;
    }
    // 计算邮费
    function calcMailFee(cls,w){
        var fee = null;
        if(cls!=null  && w>0){
            var one = CONFIG.MAIL.FEE_MAP[cls];
            var FIRST = one[0]; // 首重费用
            var OTHER = one[1]; // 续重费用

            var w_ =Math.ceil(w);// 向上取整
            fee =  FIRST+(w_-1)*OTHER;
        }
        return fee;
    }
    return calcMailFee(getAddressClass(prov, city),weight);
};
// 测试
CONFIG.MAIL.test = function(){
    console.log(CONFIG.MAIL.calc(110000,110100,1),' = 5');
    console.log(CONFIG.MAIL.calc(110000,110100,2),' = 7');
    console.log(CONFIG.MAIL.calc(420000,420100,2),' = 6');
    console.log(CONFIG.MAIL.calc(420000,420200,2),' = 6.5');
    console.log(CONFIG.MAIL.calc(420000,420300,2),' = 7');
    console.log(CONFIG.MAIL.calc(500000,500100,2),' = 9');
    console.log(CONFIG.MAIL.calc(620000,620100,2),' = 14');
    console.log(CONFIG.MAIL.calc(540000,540100,2),' = 30');
    console.log(CONFIG.MAIL.calc(320000,320500,5),' = 11');

};
//----------------------------------------配送地区、费用相关 end--------------------------------------------------------


//----------------------------------------顺丰邮费预估 start--------------------------------------------------------
// 说明：按从武汉发货，粗略预估顺丰快运的邮费
// 邮费配置
// key：省id value：数组，0-首重费用，1-续重费用
CONFIG.MAIL.SHUNFENG_FEE_FROM_WUHAN =
    {"110000":[23,10],
    "120000":[23,10],
    "130000":[23,10],
    "140000":[23,10],
    "150000":[23,13],
    "210000":[23,13],
    "220000":[23,14],
    "230000":[23,14],
    "310000":[22,8],
    "320000":[22,8],
    "330000":[22,8],
    "340000":[22,8],
    "350000":[23,10],
    "360000":[18,8],
    "370000":[23,10],
    "410000":[22,8],
    "420000":[13,2],
    "430000":[18,8],
    "440000":[23,12],
    "450000":[23,12],
    "460000":[23,13],
    "500000":[23,10],
    "510000":[23,10],
    "520000":[23,10],
    "530000":[23,13],
    "540000":[26,21],
    "610000":[23,10],
    "620000":[23,12],
    "630000":[23,13],
    "640000":[23,12],
    "650000":[26,21]};


/*
 功能：计算邮费
 参数：prov 省id
 参数：weight 重量
 返回：邮费，数组结构，第0个表示最小、第1个表示最大值
 */
CONFIG.MAIL.calcShunfengMailFee=function(prov, weight){
    this.getPara=function(prov){
        return CONFIG.MAIL.SHUNFENG_FEE_FROM_WUHAN[prov];
    };

    this.calcMailFee=function(para,w){
        var fee = null;
        var w_ =Math.ceil(w);
        fee =  para[0]+(w_-1)*para[1];
        return fee;
    };

    var fee =  this.calcMailFee(this.getPara(prov),weight);
    return [fee,fee+10];
};

// 测试
CONFIG.MAIL.test2 = function(){
    console.log(CONFIG.MAIL.calcShunfengMailFee(110000,1),' = 23');
    console.log(CONFIG.MAIL.calcShunfengMailFee(110000,2),' = 33');
};
//----------------------------------------顺丰邮费预估 end--------------------------------------------------------


// 中英文对照
CONFIG.CHS_EN = {};
// flg: -1小写,0默认,1大写
CONFIG.CHS_EN.getEn = function(chs,flg){
    var en = '';
    if(chs && this.DATA_MAP[chs+'']) {
        en = this.DATA_MAP[chs+''];
        if(en && en.length>0) {
            if(flg<0) {
                en = en.toLowerCase();
            } else if(flg>0) {
                en = en.toUpperCase();
            }
        }
    }
    return en;
};
// 中英对应表
CONFIG.CHS_EN.DATA_MAP = {
    "热门专题": "Hot Subject",
    "名片": "Business Card",
    "热门名片": "Hot Business Card",
    "海报": "Poster",
    "招贴海报": "Poster",
    "幻灯片": "Power Point",
    "热门幻灯片": "Hot Power Point",
    "传单": "Flyer",
    "热门传单": "Flyer",
    "展架": "Banner Stand",
    "热门展架": "Banner Stand",
    "场景": "Scene",
    "场景案例": "Scene",
    "优惠券": "Coupon",
    "贴纸": "Sticker",
    "不干胶": "Sticker",
    "停车牌" : "Stop Sign",

    // 通用
    "最新": "New",
    "其它": "Other",
    "其他": "Other",
    "不限": "All",
    //"推广": "Promotion",
    // 单页
    "单页": "Single Page",
    "邀请函": "Invitation Card",
    "促销": "Sales Promotion",
    "通知": "Notification",
    "求职招聘": "Recruitment",
    "推广": "Promotion",
    "网络推广": "Net Promotion",
    "电子名片": "E Business Card",// TODO
    "小程序": "Mini Programs",// TODO
    "微商": "Wechat Business",
    "创意热点": "New Idea",
    "节日祝福": "Wishes",// TODO
    // 幻灯片
    // 行业分类
    "互联网": "Internet",
    "能源": "Energy",
    "农牧": "Agriculture",
    "医药": "Medicine",
    "房地产": "Real Estate",
    "机构": "Organization",
    "交通": "Traffic",
    "旅游": "Tour",
    "教育": "Education",
    "餐饮": "Food",
    "金融": "Finance",
    // 场景分类
    "创业路演": "Presentation",
    "企业培训": "Enterprise Training",
    "工作汇报": "Work Report",
    "发布会": "Conference",
    "产品推广": "Product Promotion",
    "教学培训": "Education Training",
    "政府报告": "Government Report",
    "热门主题": "Hot Topic",
    "热点主题": "Hot Topic",
    // 社交媒体分类
    "公众号首图": "First Picture",
    "公众号小图": "WeChat Picture",
    "微博封面图": "WeiBo Cover",
    "热门公众号首图": "Hot First Picture",
    "热门公众号小图": "Hot WeChat Picture",
    "热门微博封面图": "Hot WeiBo Cover",// TODO

    // 电商分类
    "淘宝banner": "Taobao Banner",
    "淘宝主图": "Taobao Main Photo",

    // 微商
    "产品宣传": "Product Promotion",
    "代理招商": "Agent",
    "微商名片": "Business Card",
    "节日热点": "Hot Spots",
    "课程培训": "Training",
    "活动促销": "Sales",
    "红包券": "Red Envelope",
    "对比图": "Comparison Diagram",
    //"通知": "Notification",
    "证书": "Certificate",
    "微商证书": "Certificate",
    "截图": "Screenshot",
    // 主题设计
    "主题设计" : "THEME DESIGN"


};

/*
* 一键生成的 tg_type 和 size_id 关联对应表
* 一键生成的 tg_type 个 页数 关联对应表
* */
CONFIG.YJSC_TGTYPE_SIZE_MAP = {"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"110":1,"201":1,"202":1,"203":1,"204":1,"205":1,"251":1,"301":1,"302":1,"501":1,"502":1,"503":1,"504":1,"505":1,"506":1,"507":1,"509":1,"510":1,"601":1,"701":1,"801":1,"802":1,"806":1,"807":1,"901":1,"921":1,"941":1,"942":1,"20101":1,"20301":1,"20401":1,"40101":4,"40201":5,"40202":5,"40301":6,"40302":6,"40303":6,"40401":9,"40402":9,"40403":9,"40404":9,"40501":8,"40601":13,"40701":14,"40801":17,"60101":10,"60201":11,"70101":15,"70201":16,"80101":18,"80201":18,"80301":18,"80401":18,"80501":18,"80601":18,"80701":18,"80801":18,"80901":18,"81001":18,
    "10100101":19,"10100201":19,"10100301":19,
    "10110101":20,"10110102":20,"10110103":20,"10110104":20,
    "10200101":90,"10200102":95,
    "10300101":30,
    "10400101":90,"10400102":95,
    "10500101":90,"10500102":95,
    "10500201":90,"10500202":95};
CONFIG.YJSC_TGTYPE_PAGE_MAP = {"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"110":1,"201":1,"202":1,"203":1,"204":1,"205":1,"251":1,"301":1,"302":1,"501":1,"502":1,"503":1,"504":1,"505":1,"506":1,"507":1,"509":1,"510":1,"601":1,"701":1,"801":1,"802":1,"806":1,"807":1,"901":1,"921":1,"941":1,"942":1,"20101":1,"20301":1,"20401":1,"40101":2,"40201":2,"40202":2,"40301":1,"40302":1,"40303":1,"40401":1,"40402":1,"40403":1,"40404":1,"40501":1,"40601":2,"40701":1,"40801":2,"60101":1,"60201":1,"70101":1,"70201":1,"80101":1,"80201":1,"80301":1,"80401":1,"80501":1,"80601":1,"80701":1,"80801":1,"80901":1,"81001":1,
    "10100101":1,"10100201":1,"10100301":1,
    "10110101":1,"10110102":1,"10110103":1,"10110104":1,
    "10300101":1};

//------------------------------------------------------------------------------------------------
/**
 * (一键秀)订单状态
 *
 * 主订单状态:
 * 10待支付、11已支付、12支付失败、20处理中、30配送中[保留,暂不使用]、40完成、50取消
 *
 * 各类型子订单的专属状态可单独定义
 *
 * 子订单状态(去水印): 暂定0
 * 子订单状态(秒杀): 暂定0
 * 子订单状态(VIP): 暂定0
 */
CONFIG.YJX_ORDER_STATE = {
    NONE: 0,// 0无/未知
    UNPAID: 10,// 10待支付
    PAID: 11,// 11已支付
    FAILED: 12,// 12支付失败
    PROCESSING: 20,// 20处理中/制作中
    DELIVERY: 30,// 30配送中
    FINISH: 40,// 40完成
    CANCELLED: 50// 50取消
};

// (一键秀)支付平台
CONFIG.YJX_PAYMENT_PLATFORM = {
    WECHAT: 10,
    ALIPAY: 20,
    IAP: 30
};


//============================ 一键秀 挑战活动相关配置 start ===============================
// 一键秀 企业有奖征集活动的提现的门槛(用户账户的余额的最小值)，单位：分。
CONFIG.YJX_ACTIVITY_CASH_THRESHOLD = 100;
// 一键秀 企业有奖征集活动的提现的上下限，单位：分。
CONFIG.YJX_ACTIVITY_CASH_LIMIT_MIN = 100;
CONFIG.YJX_ACTIVITY_CASH_LIMIT_MAX = 10000000;

// 挑战活动 用户每日提现次数上限
CONFIG.YJX_ACTIVITY_CASH_TIMES = 10;


//============================ 一键秀 挑战活动相关配置 end ==================================

//============================ 一键秀 dev 相关配置begin ==================================
// dev 广告合作相关 db
if(CONFIG.DEBUG === 1) CONFIG.DB_HOST_MYSQL_DEV = '127.0.0.1';
if(CONFIG.DEBUG === 2) CONFIG.DB_HOST_MYSQL_DEV = '47.97.22.47';
CONFIG.DB_DATABASE_MYSQL_DEV = 'dev';
CONFIG.DB_PORT_MYSQL_DEV = 3306;
CONFIG.DB_USER_MYSQL_DEV = 'sjg';
CONFIG.DB_PASSWORD_MYSQL_DEV = '123456';

// devAd 工程配置
if(CONFIG.DEBUG === 1) CONFIG.DEV_AD_SERVER_DOMAIN = '127.0.0.1'; // 开发本地调试
if(CONFIG.DEBUG === 2) CONFIG.DEV_AD_SERVER_DOMAIN = '47.97.22.47'; // 测试服务器
CONFIG.DEV_AD_SERVER_PORT = 8443;
CONFIG.DEV_AD_SERVER_FULL_URL = 'http://' + CONFIG.DEV_AD_SERVER_DOMAIN + ':' + CONFIG.DEV_AD_SERVER_PORT;

// dev 广告合作相关 redis
if(CONFIG.DEBUG === 1) CONFIG.DEV_AD_REDIS_DOMAIN = '127.0.0.1';
if(CONFIG.DEBUG === 2) CONFIG.DEV_AD_REDIS_DOMAIN = '47.97.22.47';
CONFIG.DEV_AD_REDIS_PASSWORD = 'yjxRedisPssw123';
CONFIG.DEV_AD_REDIS_PORT = 6379;
CONFIG.DEV_AD_REDIS_NUMBER = 24;
CONFIG.DEV_AD_REDIS_TTL = 2*24*30*12;



//============================ 一键秀 dev 相关配置end ==================================

// 一键生成, 建议区域对应出血区域的倍数
CONFIG.YJSC_EDITABLE_MULTIPLE_BLEED = 1;



//============================ MQ begin ========================================
// 示界港 MQ 消息中间件配置
CONFIG.SJG_MQ = {
    ACCESS_KEY: 'LTAIjvFwG4trX6kr',
    SECRET_KEY: 'Zx0uLFZcYpKBksycJXBUyQHMbg1q01',
    // 下属topic
    TOPIC: {
        // 音频识别的 topic
        AUDIO_TO_TEXT: {
            // topic 的名称, 生产者和消费者的 group
            NAME: 'test_audio_2_text',
            PRODUCER_GROUP: 'PID_test_audio_2_text',
            CONSUMER_GROUP: 'CID_test_audio_2_text', // 集群消费
            CONSUMER_GROUP2: 'CID_test_audio_2_text2', // 广播消费
            // 本topic 下对应的 TAG
            TAG: {
                INIT: 'init',
                PROCESS: 'process'
            }
        },
    },
};
//============================ MQ end ========================================

// 示界港 语音识别配置
CONFIG.SJG_AUDIO_TO_TEXT = {
    ACCESS_KEY_ID: 'gvmMBtVhdrkVYqAt',
    ACCESS_KEY_SECRET: 'BgDhEvnYqU1N3bawYc91Pgahm99umO',
    APP_KEY: '117PTM7yIMnPNKBB',
    END_POINT: 'http://nls-meta.cn-shanghai.aliyuncs.com',
    API_VERSION: '2018-05-18',
    URI_PATH: '/pop/2018-05-18/tokens',
    TOKEN_KEY: 'a2t_token',  // 维持token 有效期内使用的redis key
};







//------------------------------------------------------------------
module.exports = CONFIG;
